
<!DOCTYPE html><html><head>
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
<meta name='viewport' content='width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no'>
<meta name='robots' content='noindex, nofollow'>
<link rel="shortcut icon" href="<?=path('static')?>/logo/favicon.ico">
<title>baidu 地图 - ysKit</title>
<script src="<?=path('ui3nd')?>/jsLibs/jquery-2.x.js"></script>
<script src='https://api.map.baidu.com/api?v=2.0&ak=MgtgVl65h2kjZUdXi8QX71dW&s=1&_r=5.1'></script>
<style type='text/css'>
    body {padding:0px; margin:0px; }
    body, html,#map {width: 100%;height: 100%;overflow: hidden;margin:0;}
    .BMapLabel{ border-radius:4px; }
    .opBar{ z-index:666; position:absolute; left:3rem; top:1rem; font-size:12px; }
    .opAct{ vertical-align:middle; }
    
    @media only screen and (max-width:710px){ .opBar{ left:1rem; top:3rem; } }
</style>
<meta name='author' content='http://txjia.com, https://gitee.com/PeaceXie/imcat, 贴心猫(imcat)'>
</head><body>
<div id="map" style="z-index:333;"></div>

<script>
function setPoint(){
  jsElm.pdID('ysKit某某科技').value =jsElm.jeID('point').value; 
  popClose(); //window.close();
}
function setUop(val){ // 0,1,2
  var opAct = jsElm.jeID('opAct'),
    index = opAct.selectedIndex;
  jsElm.jeID('point').style.display = 'none';
  jsElm.jeID('button').style.display = 'none';
  jsElm.jeID('keywd').style.display = 'none';
  jsElm.jeID('search').style.display = 'none';
  if(val){
    index = val-1;
    opAct.selectedIndex = index;
  }
  if(!index){
    jsElm.jeID('point').style.display = '';
    jsElm.jeID('button').style.display = '';
  }else{
    jsElm.jeID('keywd').style.display = '';
    jsElm.jeID('search').style.display = '';
  }
}
function soPoint(){
  var keywd = jsElm.jeID('keywd').value;
  if(!keywd) return;
  var local = new BMap.LocalSearch(map, {
      renderOptions:{map: map}
  });
  local.search(keywd); // "地王广场"
  //setUop(1);
}
</script>

<!--
http://developer.baidu.com/map/jsdemo.htm#h0_4
示例DEMO
-->
<script>

function convPos(gg_lon, gg_lat){
    var pi = 3.1415926535897932384626;
    var x = gg_lon, y = gg_lat;
    var z = Math.sqrt(x * x + y * y) + 0.00002 * Math.sin(y * pi);
    var theta = Math.atan2(y, x) + 0.000003 * Math.cos(x * pi);
    var bd_lon = z * Math.cos(theta) + 0.0065;
    var bd_lat = z * Math.sin(theta) + 0.006;
    return [bd_lon, bd_lat];
}
var lon = 113.795114; 
var lat = 22.826592; 

//var pstr = '';
var mpoint = new BMap.Point(lon, lat);
var map = new BMap.Map("map");
map.centerAndZoom(mpoint, 15);
map.addControl(new BMap.NavigationControl({type:BMAP_NAVIGATION_CONTROL_ZOOM})); //缩放
map.addControl(new BMap.ScaleControl()); // 比例尺
map.addControl(new BMap.MapTypeControl());   //添加地图类型控件
map.enableScrollWheelZoom();
var marker = new BMap.Marker(mpoint);  
map.addOverlay(marker); 
var label = new BMap.Label("ysKit某某科技",{offset:new BMap.Size(20,-10)});
marker.setLabel(label);
</script>
</body>
</html>
